# 努力学习
# 比肩漆时祺和周期许
# import unittest
# import requests
# from parameterized import parameterized
# from common.read_data import read_data
# from api.get_userlist_api import GetListApi
# from common.assert_tools import comm_assert
# class TestUserList(unittest.TestCase):
#     # session=None
#     # @classmethod
#     # def setUpClass(cls) -> None:
#     #     cls.session=requests.Session()
#     # @parameterized.expand(read_data())
#     # def test_userlist(self,rep_data,msg,status):
#     #     resp=GetListApi.get_list(self.session,rep_data)
#     #     comm_assert(self,resp,msg,status)
#     session = None
#
#     @classmethod
#     def setUpClass(cls) -> None:
#         cls.session = requests.Session()
#
#     @parameterized.expand(read_data())
#     def test_login(self, rep_data, msg, status):
#         resp = GetListApi.get_list(self.session, rep_data)
#         comm_assert(self, resp, msg, status)
# if __name__ == '__main__':
#     unittest.main()
"""添加用户"""
# import unittest
# import requests
# from parameterized import parameterized
# from common.read_data import read_json_data
# from api.get_userlist_api import AddUserApi
# from  common.assert_tools import comm_assert
# class TestAddUser(unittest.TestCase):
#     session=None
#     @classmethod
#     def setUpClass(cls) -> None:
#         cls.session=requests.Session()
#     @parameterized.expand(read_json_data())
#     def test_add(self,rep_data,msg,status):
#         resp=AddUserApi().add_user(self.session,rep_data)
#         comm_assert(self,resp,msg,status)

"""查询用户"""
import unittest
import requests
from parameterized import parameterized
from common.read_data import read_json_data
from api.get_userlist_api import GetUserApi
from  common.assert_tools import comm_assert
from common.mysql_test import MysqlTill
from common import token_data
class TestAddUser(unittest.TestCase):
    # tok=token_data()
    # print(tok)
    session=None
    @classmethod
    def setUpClass(cls) -> None:
        cls.session=requests.Session()
    # def setUp(self) -> None:
    #     delete_sql="delete from xy where mobile='18975767680'"
    #     MysqlTill.uid_sql(delete_sql)
    # def tearDown(self) -> None:
    #     delete_sql="delete from xy where mobile='18975767680'"
    #     MysqlTill.select_sql(delete_sql)


    @parameterized.expand(read_json_data())
    def test_add(self,pagenum,pagesize,msg,status):
        resp=GetUserApi().get_user(self.session,pagenum,pagesize,token_data.token_data_1())
        # comm_assert(self,resp,msg,status)
if __name__ == '__main__':
    unittest.main()






